<?php
namespace App\Params\H5;
use App\Params\Param;
/**
 * 购物车结算参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
class CartCheckoutParams extends Param
{
    public $customer_coupon_id = 0;
    public $use_points = 0;
    public $customer_id;
    public $fast_buy = 0;

    public function rules()
    {
        return [
            'customer_coupon_id' => 'nullable|integer',
            'use_points' => 'nullable|integer',
            'customer_id' => 'required|integer',
            'fast_buy' => 'nullable|integer|in:0,1'
        ];
    }

    /**
     * @return int
     */
    public function getFastBuy(): int
    {
        return $this->fast_buy;
    }

    /**
     * @param int $fast_buy
     */
    public function setFastBuy(int $fast_buy): void
    {
        $this->fast_buy = $fast_buy;
    }

    /**
     * @return int
     */
    public function getCustomerCouponId(): int
    {
        return $this->customer_coupon_id;
    }

    /**
     * @param int $customer_coupon_id
     */
    public function setCustomerCouponId(int $customer_coupon_id): void
    {
        $this->customer_coupon_id = $customer_coupon_id;
    }

    /**
     * @return int
     */
    public function getUsePoints(): int
    {
        return $this->use_points;
    }

    /**
     * @param int $use_points
     */
    public function setUsePoints(int $use_points): void
    {
        $this->use_points = $use_points;
    }

    /**
     * @return mixed
     */
    public function getCustomerId()
    {
        return $this->customer_id;
    }

    /**
     * @param mixed $customer_id
     */
    public function setCustomerId($customer_id): void
    {
        $this->customer_id = $customer_id;
    }
}
